package com.neuedu.demo4;

public class Homework05 {
    public static void main(String[] args) {
        //创建数组1随机录入值
        int[] arr1 = {1,2,3,4,5,6,7,8,9,10};
        //初始化创建数组2,长度为数组1的长度
        int[]arr2 = new int[arr1.length];
        //利用for循环将数组一的值从打到小依次赋值给数组2
        for (int i = 0,j= arr1.length-1; i < arr1.length; i++,j--) {
            arr2[i]=arr1[j];
        }
        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }
    }
}
